<!DOCTYPE html>
<html lang="zh">
	<head>
            <meta charset="utf-8" />
            <title>龙虾直播_最娱乐直播平台</title>
            <meta http-equiv="X-UA-Compatible" content="edge" />
            <meta name="description" content="overview &amp; stats" />
            <meta name="viewport" content="width=device-width, initial-scale=1.0" />
            <!-- basic styles -->
            <link href="__PUBLIC__/assets/css/bootstrap.min.css" rel="stylesheet" />
            <link rel="stylesheet" href="__PUBLIC__/assets/css/font-awesome.min.css" />
            <link rel="stylesheet" href="__PUBLIC__/font2/font/css/font-awesome.css" />
            <link rel="stylesheet" href="http://web.mcooz.com/dogegg_emoji/lib/css/jquery.mCustomScrollbar.min.css"/>
            <link rel="stylesheet" href="http://web.mcooz.com/dogegg_emoji/dist/css/jquery.emoji.css"/>
            <!--[if IE 7]>
              <link rel="stylesheet" href="__PUBLIC__/assets/css/font-awesome-ie7.min.css" />
            <![endif]-->
            <!-- page specific plugin styles -->
            <!-- fonts -->
            <link rel="stylesheet" href="__PUBLIC__/assets/css/ace-fonts.css" />
            <!-- ace styles -->
            <link rel="stylesheet" href="__PUBLIC__/assets/css/ace.min.css" />
            <link rel="stylesheet" href="__PUBLIC__/assets/css/ace-rtl.min.css" />
            <link rel="stylesheet" href="__PUBLIC__/assets/css/ace-skins.min.css" />
            <link rel="stylesheet" href="__PUBLIC__/krosExt.css" />
            <!--[if lte IE 8]>
              <link rel="stylesheet" href="__PUBLIC__/assets/css/ace-ie.min.css" />
            <![endif]-->
            <!-- inline styles related to this page -->
            <!-- ace settings handler -->
            <script src="__PUBLIC__/assets/js/ace-extra.min.js"></script>
            <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
            <!--[if lt IE 9]>
            <script src="__PUBLIC__/assets/js/html5shiv.js"></script>
            <script src="__PUBLIC__/assets/js/respond.min.js"></script>
            <![endif]-->
            <script src="http://web.mcooz.com/js/jquery-1.7.2.min.js"></script>   
            <link href="__PUBLIC__/huojian/css/lrtk.css" rel="stylesheet" type="text/css" />
            <script type="text/javascript" charset="UTF-8" src="http://web.mcooz.com/js_source/artdialog/artDialog.source.js.js"></script>
            <script type="text/javascript" charset="UTF-8" src="http://web.mcooz.com/js_source/artdialog/plugins/iframeTools.source.js"></script>
            <link rel="stylesheet" type="text/css" href="http://web.mcooz.com/js_source/artdialog/skins/idialog.css" />
            <script type="text/javascript" src="__PUBLIC__/huojian/js/lrtk.js"></script>
            <script type="text/javascript" src="__PUBLIC__/js/jquery.easing.1.3.js"></script>
            <script src="http://web.mcooz.com/dogegg_1/jquery.infinitescroll.js"></script>
            <script src="http://web.mcooz.com/dogegg_1/behaviors/manual-trigger.js"></script>
            <script src="http://web.mcooz.com/dogegg_emoji/lib/script/jquery.mousewheel-3.0.6.min.js"></script>
            <script src="http://web.mcooz.com/dogegg_emoji/lib/script/jquery.mCustomScrollbar.min.js"></script>
            <script src="http://web.mcooz.com/dogegg_emoji/src/js/jquery.emoji.js"></script>
            <script type="text/javascript">
            var _speedMark = new Date();
            </script>
             <script type="text/javascript">
              //WebSocket = null;
              </script>
              <link href="__PUBLIC__/css/c.css" rel="stylesheet">
              <style>
            .say-btn {
              height: 5em;
              float: left;
              margin-top: 0;
              width: 17%
            }	
            .textarea {
              height: 5em;
              width: 83%;
              float: left;
            }
            .btn.btn-default {
              height: 5em;
              width: 100%;
            }
            #rocket-to-top,#rocket-to-top1{
                    top: 1800px;
            }


            .icon-heart {
              cursor: pointer;
            }

            .g-img {
              border: 0 none;
              cursor: pointer;
              height: 45px;
              width: 45px;
              border-radius:4px;
            }

            .huojian,.Atlantis,.artillery,.plane,.ship {
              border-radius: 4px;
              height: 40px;
              line-height: 1;
              padding: 4px;
              position: relative;
              width: 50px;
              float: right;
            }

             .follow-btn {
              background-color: #f70;
              border: 1px solid #e5e5e5;
              border-radius: 18.5px 0 0 18.5px;
              color: #fff;
              height: 25px;
              line-height: 25px;
              width: 69px;
              position: relative;
            }
            .fl {
              float: left;
            }
             .r-num span {
              color: #879aa8;
              display: inline-block;
              height: 25px;
              line-height: 25px;
              padding: 0 9px;
              font-size: 12px;
            }

             .r-num {
              -moz-border-bottom-colors: none;
              -moz-border-left-colors: none;
              -moz-border-right-colors: none;
              -moz-border-top-colors: none;
              border-color: #e5e5e5 #e5e5e5 #e5e5e5 currentcolor;
              border-image: none;
              border-radius: 0 18.5px 18.5px 0;
              border-style: solid solid solid none;
              border-width: 1px 1px 1px medium;
              color: #879aa8;
              height: 25px;
              line-height: 25px;
              min-width: 70px;
              text-align: center;
            }

             .follow-btn i {
              background-position: -96px 0;
              display: block;
              height: 13px;
              left: 9px;
              position: absolute;
              top: 6px;
              width: 14px;
            }

            .follow-btn span {
              display: block;
              font-size: 13px;
              height: 25px;
              line-height: 25px;
              padding-left: 30px;
              font-size:12px;
            }
            a, a:hover, ins {
              text-decoration: none;

            }
            .follow-btn:hover{
                color: #fff;

            }
            .nav.ace-nav a {
            }
            .fa-eye{
                color:#ff7700;
            }
            .liwu{height: 50px;margin-bottom: 10px}
             .getYc {
              background: #f60 none repeat scroll 0 0;
              border-radius: 9.5px;
              color: #fff;
              display: inline-block;
              float: none;
              height: 20px;
              line-height: 20px;
              padding: 0 15.5px;
              text-align: center;
              vertical-align: top;
            }
            .s_sh{
              background: url(__PUBLIC__/images/gift_background.png);
              background-repeat: no-repeat;
              background-color: #b2d8df;
            }
            .n{
                background: url(__PUBLIC__/images/icon.png);
              background-repeat: no-repeat;
                float: left;
              height: 30px;
              width: 30px;

            }

            .sign {
            background-position: 0 10px;
            }
             .n0 {
            background-position: 0 -20px;
            }
            .n1 {
            background-position: 0 -53px;
            }
            
             .n2 {
            background-position: 0 -86px;
            }
              .n3 {
            background-position: 0 -117px;
            }
              .n4 {
            background-position: 0 -149px;
            }
              .n5 {
            background-position: 0 -181px;
            }
              .n6 {
            background-position: 0 -212px;
            }
              .n7 {
            background-position: 0 -241px;
            }
              .n8 {
            background-position: 0 -270px;
            }
              .n9 {
            background-position: 0 -299px;
            }
            .mg0{
                margin:0
            }
            .page-header h1 {
                margin: 0 ;
              }

            .fr{float: right}
            .getYc:hover{color: #fff;text-decoration: none}
            #dialog
            {
                    min-height:400px;
                    background:#f8f8f8;
                    overflow: scroll;
            }
            .giftBox {
            border: 1px solid #e5e4e4;
            height: 90px;
            background: #fff;
            }
            .pd0 {
            padding: 0;
            }
            .col-sm-2.pd0 {
            width: 100px;
            }
            .page-header h1 small {
            color: #000;
            font-size: 17px;
            }
            .contribution {
            margin-bottom: 30px;
            margin-top: 5px;
            min-height: 110px;
            padding-bottom: 6px;
            padding-top: 0;
            text-align: center;
            transition: margin-bottom 0.4s ease 0s;
            width: 33%;
            float:left;
            margin: 7px 0;
            position: relative;
            white-space: nowrap;
            }
 .kros-avatar {
  display: block;
  height: 74px;
  margin: 0 auto;
  position: relative;
  width: 63px;
}
 .kros-avatar img {
  height: 58px;
  margin-left: -3px;
  margin-top: 15px;
  width: 58px;
}
 .kros-icon {
  background: rgba(0, 0, 0, 0) url(__PUBLIC__/images/contribution-item-icon2.png) no-repeat scroll 0 0;

  display: inline-block;
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
}
.fans-list {
  background: #fff none repeat scroll 0 0;
  border-radius: 4px 4px 0 0;
  max-height: 100%;
  min-height: 100%;
  position: absolute;
  transition: max-height 0.3s ease 0s;
  overflow: hidden;
  width:100%;
}
.fans-rank {
  height: 191px;
  z-index: 200;
  position: relative;
}

.kros-2 .kros-avatar {
  height: 82px;
  width: 70px;
}
.kros-2 img {
  height: 68px;
  margin-left: 0;
  margin-top: 14px;
  width: 68px;
}
.kros {
  margin: 7px 0;
  position: relative;
  white-space: nowrap;
}
.kros-4 {
  clear: both;
}
.nav-tabs > li > a, .nav-tabs > li > a:focus {
  margin-right: 0px;
}
 .kros-2 .kros-icon {
  background: rgba(0, 0, 0, 0) url(__PUBLIC__/images/contribution-item-icon1.png) no-repeat scroll 0 0;
 }
  .kros-3 .kros-icon {
  background: rgba(0, 0, 0, 0) url(__PUBLIC__/images/contribution-item-icon3.png) no-repeat scroll 0 0;
 }
 .level-bgpng {
  background-image:  url(__PUBLIC__/images/level-csssprite.png);
  display: inline-block;
  height:16px;
  width:40px;
}
.kros-1 .r-nick,.kros-2 .r-nick,.kros-3 .r-nick{
    display: block;
}
 .n-icon {
  background: #eee none repeat scroll 0 0;
  border-radius: 50%;
  color: #999;
  display: inline-block;
  font-style: normal;
  height: 20px;
  line-height: 20px;
  margin-right: 10px;
  text-align: center;
  width: 20px;
}
.kros-1 .r-nick,.kros-3 .r-nick{
 
  margin-top:10px;
  color: #797f89;
  display: block;
  font-size: 12px;
  height: 24px;
  line-height: 24px;
  max-width: 95%;
  padding-left: 0;
  text-align: center;
  width: 95%;
}


.fans-rank .r-list li .cuserlevel {
  vertical-align: middle;
}
.chat-cont .c-list .user_level, .chat-cont .c-list img, .chat-cont .c-list li .rank-wel .user-level, .chat-cont .c-list li .rank-wel a, .chat-cont .c-list li .task-wel .user-level, .chat-cont .c-list li .task-wel a, .chat-cont .chat-cls .icon, .fans-list .f-tit .vip img, .fans-rank .r-list li .l-icon img, .fans-rank .r-list li .n-icon, .r-list .noble-level img {
  vertical-align: middle;
}
 .r-nick {
  color: #797f89;
  display: inline-block;
  height: 26px;
  line-height: 26px;
  max-width: 110px;
  overflow: hidden;
  padding-left: 10px;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
  word-break: break-all;
}
ul, ol {
  margin: 0;
  padding: 0;
}
.col-sm-10  small {
  color: #000;
  font-size: 17px;
}
.speech_item {
  line-height: 30px;
}
.follow{
    background:#bcc3cf;
    color: #fff;
}
.chat-user-card-holder {
  height: 0;
  position: absolute;
  width: 0;
  z-index: 312;
}
.chat-user-card-wrap {
  background: #fff none repeat scroll 0 0;
  border-radius: 5px;
  box-shadow: 0 0 8px #ccc;
 
  position: relative;
  width: 310px;
}
.chat-user-card-wrap .card-close {
  color: #444;
  font-size: 16px;
  position: absolute;
  right: 13px;
  top: 0;
  z-index: 1;
}

.chat-user-card {
  padding: 7px;
}
.chat-user-card-wrap .user-card-avatar {
  position: relative;
}
.chat-user-card-wrap .user-card-title {
  margin-right: 16px;
  overflow: hidden;
  padding-bottom: 5px;
  padding: 0px;
  white-space: nowrap;
}
.user-card-title h1 {
  color: #2c3e50;
  font-size: 14px;
  margin:0px;
  overflow: hidden;
  padding: 6px 0 2px;
  text-overflow: ellipsis;
  
}
.chat-user-card-wrap .user-card-action {
  clear: left;
  margin: 8px auto 0;
  overflow: hidden;
  padding-top: 8px;
  white-space: nowrap;
}
.user-card-action .action-item {
  border: 1px solid #ddd;
  border-radius: 2px;
  color: #666;
  cursor: pointer;
  float: left;
  line-height: 23px;
  margin: 0 4px 4px;
  padding: 0 8px;
  position: relative;
  text-align: center;
  vertical-align: middle;
  font-size:12px;
}
.warning{
    color:red;
}
.cuserlevel {
  vertical-align: middle;
}
.level-size1_ {
  display: inline-block;
  margin-bottom: 3px;
  margin-right: 3px;
}
.spa {
  margin-left: 5px;
  margin-right: 10px;
}
.h20{
    height:20px;
}
.f12{
    font-size: 12px;
}
.pd{padding:0}
.mgt10 {
  margin-top: 10px;
}
.mgr20{
    margin-right: 20px;
}
.wd100{
    width:100px;
}
.inb{display: inline-block}
.org {
  color: #ff7700;
}
.kros_remove.wd100.inb.f14 {
  font-size: 14px;
}
.mgl5{margin-left:5px}
.mgr5{margin-right: 5px}

 .sq-wrap {
  position: absolute;
  right: 13px;
  top: 60px;
}
 .tit {
  color: #666;
  cursor: pointer;
  font-size: 13px;
  line-height: 24px;
}
.share-icon {
  background-position: -216px 0;
  display: inline-block;
  height: 17px;
  margin-right: 8px;
  vertical-align: middle;
  width: 15px;
}
.share-box .tit span {
  color: #2c3e50;
  display: inline-block;
  height: 17px;
  line-height: 17px;
  vertical-align: middle;
}
.sq-wrap .out .con {
  animation: 0.4s cubic-bezier(0.22, 0.58, 0.12, 0.98) 0s normal none 1 running scale-out;
}
.share-box .con {
  display: block;
  width: 374px;
}
.share-box .con {
  left: -207px;
  padding: 10px 15px 15px;
}
.share-box .con {
  transform-origin: 70% 0 0;
}
 .con {
  -moz-border-bottom-colors: none;
  -moz-border-left-colors: none;
  -moz-border-right-colors: none;
  -moz-border-top-colors: none;
  animation: 0.5s cubic-bezier(0.22, 0.58, 0.12, 0.98) 0s normal none 1 running scale-in-ease;
  background: #fff none repeat scroll 0 0;
  border-color: #ff8e01 #dcdcdc #dcdcdc;
  border-image: none;
  border-radius: 3px;
  border-style: solid;
  border-width: 2px 1px 1px;
  cursor: auto;
  position: absolute;
  top: 30px;
  transition: all 0.2s cubic-bezier(0.22, 0.58, 0.12, 0.98) 0s;
}
 .con {
  animation: 0.5s cubic-bezier(0.22, 0.58, 0.12, 0.98) 0s normal none 1 running scale-in-ease;
  transition: all 0.2s cubic-bezier(0.22, 0.58, 0.12, 0.98) 0s;
}
.hide {
  display: none;
}
 .arrow-icon {
  border-bottom: 9px solid #ff8e01;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  display: block;
  height: 0;
  left: 58%;
  margin-left: 11px;
  position: absolute;
  top: -9px;
  width: 0;
}
.share-box .tit span {
  color: #2c3e50;
  display: inline-block;
  height: 17px;
  line-height: 17px;
  vertical-align: middle;
}
.qrcode-box .tit a {
  color: #2c3e50;
  line-height: 19px;
}
.qrcode-box .tit .qrcode-icon, .qrcode-box .tit a {
  display: inline-block;
  height: 19px;
  vertical-align: middle;
}
.qrcode-box .con .q-app-box .download .down-icon, .qrcode-box .con .q-app-box .q-ewm .q-ewm-fr .qrcodebg, .qrcode-box .tit .qrcode-icon, .room-mes .btn-group .focus-box .follow-btn i, .room-mes .r-else li .num-v-icon, .room-mes .r-else li .weight-v-icon, .room-mes .r-else li .zb-name-icon, .share-box .con .s-more a, .share-box .con .share-more .wx-qcode .wex-icon, .share-box .tit .share-icon {
  background-image: url("__PUBLIC__/images/uinfo.png") ;
  background-repeat: no-repeat;
}
 .share-icon {
  background-position: -216px 0;
  display: inline-block;
  height: 17px;
  margin-right: 8px;
  vertical-align: middle;
  width: 15px;
}
.qrcode-icon {
  background-position: -129px 0;
  margin-right: 8px;
  width: 14px;
}
.share-box {
  border-right: 1px solid #eaeaeb;
  padding: 0 10px;
}
.qrcode-box, .share-box {
  height: 24px;
  margin-left: 15px;
  position: relative;
  width: 78px;
  z-index: 104;
}
.qrcode-box {
  width: 94px;
}
.reply {
  background: #ffffee none repeat scroll 0 0;
  padding-left: 20px;
}
.author{
    color: #428bca;
}
.box1 {
  background: #fff none repeat scroll 0 0;
  margin-bottom: 5px;
}
.subject {
  line-height: 40px;
  margin-bottom: 0;
  padding-left: 5px;
}
.box2 {
  background: #f2f2f2 none repeat scroll 0 0;
}
div[id*='navigation'] > a {
  display: inline-block;
  text-align: center;
  width: 100%;
}
.nick_name{
    color:#f60;
}
.now_status {
  padding-top: 20px;
  padding-left: 10px;
}
.sub_img{
    height: auto;
    width: 130px;
}
#hproduct > div {
  margin-left: 15px;
}
.div_img {
  margin-bottom: 15px;
}
.date{
    color: #999;
    margin-right:10px;
}

            </style>
            <script type="text/javascript" src="__PUBLIC__/js/swfobject.js"></script>
            <script type="text/javascript" src="__PUBLIC__/js/web_socket.js"></script>
            <script type="text/javascript">
            function removeHTMLTag(str){
                str = str.replace(/<\/?[^>]*>/g,''); //去除HTML tag
                str = str.replace(/[ | ]*\n/g,'\n'); //去除行尾空白
                //str = str.replace(/\n[\s| | ]*\r/g,'\n'); //去除多余空行
                str=str.replace(/&nbsp;/ig,'');//去掉&nbsp;
                return str;
            }

            function IsPC() {
                var userAgentInfo = navigator.userAgent;
                var Agents = ["Android", "iPhone",
                            "SymbianOS", "Windows Phone",
                            "iPad", "iPod"];
                var flag = true;
                for (var v = 0; v < Agents.length; v++) {
                    if (userAgentInfo.indexOf(Agents[v]) > 0) {
                        flag = false;
                        break;
                    }
                }
                return flag;
            }
            
        function _convert_expression(){
            $(".speech_item").emojiParse({
    icons: [{
        path: "http://web.mcooz.com/dogegg_emoji/dist/img/tieba/",
        file: ".jpg",
        placeholder: ":{alias}:",
        alias: {
            1: "hehe",
            2: "haha",
            3: "tushe",
            4: "a",
            5: "ku",
            6: "lu",
            7: "kaixin",
            8: "han",
            9: "lei",
            10: "heixian",
            11: "bishi",
            12: "bugaoxing",
            13: "zhenbang",
            14: "qian",
            15: "yiwen",
            16: "yinxian",
            17: "tu",
            18: "yi",
            19: "weiqu",
            20: "huaxin",
            21: "hu",
            22: "xiaonian",
            23: "neng",
            24: "taikaixin",
            25: "huaji",
            26: "mianqiang",
            27: "kuanghan",
            28: "guai",
            29: "shuijiao",
            30: "jinku",
            31: "shengqi",
            32: "jinya",
            33: "pen",
            34: "aixin",
            35: "xinsui",
            36: "meigui",
            37: "liwu",
            38: "caihong",
            39: "xxyl",
            40: "taiyang",
            41: "qianbi",
            42: "dnegpao",
            43: "chabei",
            44: "dangao",
            45: "yinyue",
            46: "haha2",
            47: "shenli",
            48: "damuzhi",
            49: "ruo",
            50: "OK"
        }
    }, {
        path: "http://web.mcooz.com/dogegg_emoji/dist/img/qq/",
        file: ".gif",
        placeholder: "#qq_{alias}#"
    }]
});
            }
            

            if (typeof console == "undefined") {    this.console = { log: function (msg) {  } };}
            WEB_SOCKET_SWF_LOCATION = "__PUBLIC__/js/WebSocketMain.swf";
            WEB_SOCKET_DEBUG = true;
            var ws, identity,kros_id=0,kros_name,name,agent,shipStop=1,timer=new Array(),renwu=new Array(),open_=new Array(),form_ID,playerWidth_,chatWidth,shipCount=1,openStatus=0, client_list={};
            $flag=IsPC();
            if($flag!=true){
                agent='mobile';
            }
            else{
                agent='pc'
            }
            switch(<{$Example_identity}>){
                case 0:
                   identity=''
                    break;
                case 1:
                  identity='房管'
                    break;
                 case 2:
                    identity='超管'
                    break;
                    case 3:
                   identity='系统管理员'
            }

    function connect() {
       ws = new WebSocket("ws://www.xian08.com:7272");
       ws.onopen = onopen;
       ws.onmessage = onmessage; 
       ws.onclose = function() {
          console.log("连接关闭，定时重连");
          connect();
       };
       ws.onerror = function() {
          console.log("出现错误");
       };

   /*   ws1 = new WebSocket("ws://www.xian08.com:8282");
      ws1.onopen = onopen;

       ws1.onmessage = onmessage; 
       ws1.onclose = function() {
          console.log("连接关闭，定时重连");
          connect();
       };
       ws1.onerror = function() {
          console.log("出现错误");
       }; */
    }

    function onopen(){
        name="<{$Example_username}>"
        uid='<{$Example_uid}>';
        item_id='<{$id}>';
         var login_data = '{"type":"login","client_name":"<{$Example_username}>","client_name":"'+name.replace(/"/g, '\\"')+'","room_id":"<{$id}>","agent":"<{$agent}>","uid":"'+uid+'","item_id":"'+item_id+'"}';
        console.log("握手成功，发送登录数据:"+login_data);
        ws.send(login_data);
       // ws1.send(login_data);
    }
    function Y(element){
    return document.getElementById(element);
    };



    function sfdf(){
        $('#rocket-to-top').css({ top:"1600px"});
        }
        function reset(){
		$('#Atlantis').css({ top:"1600px"});
	}

    $.fn.wait = function(time, type) {
        time = time || 800;
        type = type || "fx";
        return this.queue(type, function() {
            var self = this;
            setTimeout(function() {
                $(self).dequeue();
            }, time);
        });
    };




    function onmessage(e)
    {
        console.log(e.data);
       //alert(e.data)
        var data = eval("("+e.data+")");
        switch(data['type']){
            case 'ping':
                ws.send('{"type":"pong"}');
                //ws1.send('{"type":"pong"}');
                break;;
            case 'login':
                
                $("#num-v").html(data['online']+1);
                
                 
                var str = '欢迎来到<{$nick_name}>的直播间,喜欢的请关注一哈,龙虾提倡健康直播,工作人员24小时巡查,任何违规直播将被平台关闭,并封号,相关证据将成为呈堂公证!';

                warning(str);
               
                    
               if(data['client_name']==''){
                // alert(1)
              // say_login(data['client_id'], data['client_name'],  data['client_name'], data['time'],  data['agent']);
              
                }
                else{
                var str = ' 进入了直播间';
                say_login(data['client_id'], data['client_name'],  data['client_name']+str, data['time'],  data['agent'],  data['grade_level'],  data['is_host'],data['is_manager']);
                
                }
                kros_id=data['client_id'];
                kros_name=data['client_name'];

                if(data['client_list'])
                {
                    client_list = data['client_list'];
                }
                else
                {
                    client_list[data['client_id']] = data['client_name']; 
                }
                flush_client_list();
                console.log(data['client_name']+"登录成功");
                break;
            // 发言
            case 'say':
    
                //{"type":"say","from_client_id":xxx,"to_client_id":"all/client_id","content":"xxx","time":"xxx"}
                //
    /*              if(<{$Example_gag}>==0)
                {

                      say(data['from_client_id'], data['from_client_name'], data['content'], data['time']);
                   
                }
                else
                {
                   say_gag(data['from_client_id'], data['from_client_name'], data['content'], data['time']);
                   


                }*/
              //  alert(e.data)
            //alert(data['shipCount'])
          //alert(data['grade_level'])

    say(data['from_client_id'], data['from_client_name'], data['content'], data['time'], data['agent'],data['ship'],data['shipCount'],data['grade_level'],data['is_manager'],data['is_host']);


            from_ID=data['from_client_id'];
            
            if(data['content']=="huojian")  {
                                                sdfdsfdfs();
                                             }

            if(data['content']=="Atlantis") {
                                                Atlantis();
                                            }     



          if(data['ship']==1){
          
          
                         /*       var url = '<{:U('index/d_renwu')}>';

                               $.getJSON(url,{'renwu':data['from_client_name']},function(json)
                               {

        
        
        
                                        })*/
                                    
                 } 
                 //  if(data['ship']==1){
            //alert(data['from_client_id'])
                  //  changeShipCount(data['shipCount']);
                    /*  from_id=data['from_client_id'];
                                   if(open_[from_id]!=1){
                                                    shipGift(data['shipCount'],data['from_client_id']);

                                                    open_[from_id]=1;

                                                   suo()

                                              }    

                                            else{

                                                 stopSuo();

                                                   suo()

                                                }

                                }               */

 
     //alert(data['changeShip']);
     //var renwu=new Array()
      //alert(renwu.toString())
        if(data['changeShip']){

                                    //stopSuo();

                 
                 
                 
                //renwu.push(data['from_client_id'])
         /*   $(document).queue(function () {
                  gone(data['from_client_id']);
                $(this).dequeue();
              });*/
                                 
                           //  gone(data['from_client_id']);
                               
                                    //open_[1]=0;  


                                }
                          
                           
               
                           //     for(var i=0;i<renwu.length;i++){
                                
                    /*              $("#s_sh_"+id).animate({width:'0'},1,function (){
                $(this).remove();
                $(".n").remove();
                });*/
                
                
                    /*            $("#s_sh_"+renwu[i]).queue(function () {
                                     $(this).remove();
                                $(".n").remove();
                            stopSuo(renwu[i]);
                                  $(this).dequeue();
                                })
                                
                   
              
                               
                               
                               }*/
                               
                             //  renwu=[];
                               
  
                               /*  openStatus=0;
                                    stopSuo(renwu[i]);*/
                               
                                   
            

                break;
            // 用户退出 更新用户列表
            case 'logout':
                //{"type":"logout","client_id":xxx,"time":"xxx"}
                //say(data['from_client_id'], data['from_client_name'], data['from_client_name']+' 退出了', data['time']);
                delete client_list[data['from_client_id']];
                flush_client_list();
        }

        data=null;
    }

    function get_content(e)
    {


        console.log(e.data);
        var data = eval("("+e.data+")");

        alert(data);

        alert(0)



    }


    // 提交对话
    function onSubmit(uid,urlVal,item_id) {  
      var input = document.getElementById("textarea");
     /* if (<{$Example_gag}>==1) {
            var x = "";
            $("#client_list option").each(function() {
                if($(this).text() == "kros") {
                    x = $(this).val();
                }
            })
            var to_client_id =x;
            var to_client_name = 'kros';
            input.value ='您已被禁言!';
      } else{*/
        var to_client_id = $("#client_list option:selected").attr("value");
         var to_client_name = $("#client_list option:selected").text();
    //  };

          if(uid==''){
                    art.dialog.open(urlVal, {
                    title: '登录',
                    });                 
                    }
                else{
            
            ws.send('{"type":"say","uname":"<{$Example_username}>","level":"1","to_client_id":"'+to_client_id+'","to_client_name":"'+to_client_name+'","content":"'+input.value.replace(/"/g, '\\"').replace(/\n/g,'\\n').replace(/\r/g, '\\r')+'","uid":"'+uid+'","item_id":"'+item_id+'"}');
              
           // ws1.send('{"type":"say","uname":"<{$Example_username}>","level":"1","to_client_id":"'+to_client_id+'","to_client_name":"'+to_client_name+'","content":"'+input.value.replace(/"/g, '\\"').replace(/\n/g,'\\n').replace(/\r/g, '\\r')+'","uid":"'+uid+'","item_id":"'+item_id+'"}');
            }  
            input.value = "";
            input.focus();
            }


    function onSubmit1(uid,urlVal,doUrl,to_id,gift_id){
                if(uid==''){
                    art.dialog.open(urlVal, {
                    title: '登录',
                    });
                    $('input[name="refer"]').val("{$refer}");
                }
                else{
                        var url =doUrl;
                        $.getJSON(url,{'uid':uid,'gift_id':gift_id,'to_id':to_id},function(json){
                                        if(json.status==1){
                                         var input ="huojian";
                                         ws.send('{"type":"say","uname":"<{$Example_username}>","level":"1","to_client_id":"all","to_client_name":"","content":"'+input.replace(/"/g, '\\"').replace(/\n/g,'\\n').replace(/\r/g, '\\r')+'"}');
                                        }
                                        else{
                                        alert(json.message)
                                        }

                        })
                }
    }


        function onSubmit2(uid,urlVal,doUrl,to_id,gift_id) {
        
            if(uid==''){
                    art.dialog.open(urlVal, {
                    title: '登录',
                    });
                    $('input[name="refer"]').val("{$refer}");
                }
                else{
                        var url =doUrl;
                        $.getJSON(url,{'uid':uid,'gift_id':gift_id,'to_id':to_id},function(json){
                                        if(json.status==1){
                                         var input ="Atlantis";
                                         ws.send('{"type":"say","to_client_id":"all","to_client_name":"","content":"'+input.replace(/"/g, '\\"').replace(/\n/g,'\\n').replace(/\r/g, '\\r')+'"}');
                                        }
                                        else{
                                        alert(json.message)
                                        }

                        })
                }
        
        
    }
    



    // 刷新用户列表框
    function flush_client_list(){
        var userlist_window = $("#userlist");
        var client_list_slelect = $("#client_list");
        userlist_window.empty();
        client_list_slelect.empty();
        userlist_window.append('<h4>在线用户</h4><ul>');
        client_list_slelect.append('<option value="all" id="cli_all">所有人</option>');
        for(var p in client_list){
            userlist_window.append('<li id="'+p+'">'+client_list[p]+'</li>');
            client_list_slelect.append('<option value="'+p+'">'+client_list[p]+'</option>');
        }
        $("#client_list").val(select_client_id);
        userlist_window.append('</ul>');
    }


        function is_identity(from_client_name,item_id){
         var url = '<{:U('index/is_identity')}>';
                        $.getJSON(url,{'from_client_name':from_client_name,'item_id':item_id},function(json){
                        
                        res=json.status
                           });  
        
           return res;

        }

    function info(from_client_name){
            var top = $("#dialog").offset().top+80;
            var left=parseInt($("#dialog").offset().left)+40;
            //box='<div class="chat-user-card-holder" id="chat-user-card-holder"><div class="chat-user-card-wrap   lv--0"><a class="card-close"href="javascript:;"data-type="closecard">×</a><div class="chat-user-card"><div class="user-card-main clearfix"><div class="user-card-widget-tl"></div><div class="user-card-widget-br"></div><div class="user-card-title"><h1>dogegg123</h1><strong class="user-card-badge"><span><span class="user-level level-1  level-size1 level-bgpng   lve-icon-1to9  "></span></span></strong></div></div><div class="user-card-action"><div class="user-card-action-inr"><a class="action-item"data-type="toreport"clt="0"rel="142774332"gid="1"chatid="191f9511c367477e771e050000000000"nickname="dogegg123">举报用户</a><a class="action-item"data-type="shield"href="javascript:;"rel="0"><i class="icon pb-icon"></i>屏蔽用户</a><a class="action-item"data-type="appoint"href="javascript:;"style="display: none;">任命房管</a><a class="action-item"data-type="mute"href="javascript:;">禁止发言</a><a class="action-item"data-type="sendletter"href="/member/pm"rel="142774332"target="_blank"><span>发站内信</span></a></div></div></div></div></div>'
                        var url = '<{:U('index/get_card')}>';
                $.getJSON(url,{'username':from_client_name,'uid':'<{$Example_uid}>','item_id':'<{$id}>'},function(json){
                var Html = template.render('cardTemplate',json);
                $('#chat-user-card-holder').empty().append( Html);
                 });  
            $('#chat-user-card-holder').css({'display':'block','left':left,'top':top});
    }
    
    function close_card(){
    
        $('#chat-user-card-holder').css({'display':'none'});
    
                    }
    
    function get_level(from_client_name){
         var url = '<{:U('index/get_level')}>';
                        $.getJSON(url,{'username':from_client_name},function(json){
                        
                        res=json.grade_level
                           });  
        
           return res;

        }
    
    // 发言
    function say(from_client_id, from_client_name, content, time, agent,ship,shipCount,grade_level,is_manager,is_host){
                content=removeHTMLTag(content);
                    //var agent ="<{$agent}>";
                if(content=='Atlantis1'){
                   return;
                }     
                if( agent=='mobile'){
                agentHtml='<i class="fa fa-mobile fa-1x cuserlevel " aria-hidden="true" style="color:#428bca"></i>'
                }else{
                agentHtml='<i class="fa fa-desktop fa-1x cuserlevel" aria-hidden="true" style="color:#428bca"></i>'
                }
               // b=is_identity(from_client_name,'<{$id}>')
               b=is_manager;
                  if(b==1){
                  identity='房管'
                }  else if(is_host==1){
                identity='主播'
                
                }
                
                else{
                identity=''
                }
                 if (content.indexOf("禁言") > 0) {
                    var html='<div class="speech_item warning">系统提示:'+content+' </div>';

                 
                    } else if(content.indexOf("主播") > 0){
                    var html='<div class="speech_item warning">系统提示:'+content+' </div>';
                    }
                    
                    else if(ship==1){
                     content=$.parseJSON(content); 
                  // alert(content)
                  if(content.status==1){
                      
                      var html='<div class="speech_item ">'+content.message+' </div>';
                  }else{
                  
                      
                      
                   
                   
                    
                    var html='<div class="speech_item warning">系统提示:'+content.message+' </div>';}
                    }
                    
                    else{
                    
                    
                code_="<a  id='"+from_client_name+ "' href='javascript:info(\""+from_client_name+ "\")' >";
                level=' <span class="l-icon cuserlevel level-'+grade_level+' level-bgpng  level-size1_" ></span>'
                var html='<div class="speech_item">'+agentHtml+'<span  class="identity">'+identity+'</span>'+level+code_+from_client_name+'</a><span class="spa">:</span>'+content+' </div>'
                }

                content=null;
                 // $("#dialog").append('<div class="speech_item">'+agentHtml+'<span  class="identity">'+identity+'</span> '+from_client_name+':'+content+' </div>');
                document.getElementById("dialog").innerHTML += html;
                _convert_expression();
                document.getElementById("dialog").scrollTop = document.getElementById("dialog").scrollHeight;   
                //  $("#dialog").scrollTop = $("#dialog").scrollHeight; 
                
                var shipGiftWidth=parseInt($("#s_sh_"+from_client_name).width())
                var o = document.getElementById("#s_sh_"+from_client_name);
               // var shipGiftWidth = o.offsetWidth;  //宽度
                if(ship==1){
                
                
                
                      /*  if(!shipGiftWidth|| shipGiftWidth=='null'||shipGiftWidth<30){

                        chatWidth=parseInt($(".thumbnail").width())+10;
                        var shipHtml='<div class="s_sh" id="s_sh_'+from_client_name+'"><div class="nbox" id="nbox"><span class="n sign"></span><span id="shipCount" class="n n'+shipCount+'"></span></div> </div>'
                        document.getElementById("dialog").innerHTML += shipHtml;
                        $("#s_sh_"+from_client_name).css({ position:"absolute",top:rd(100,500),left:"13px",width:chatWidth,height:"40px"});
                         openStatus=1
                         
                                                                }
                         
                         
                        suo(from_client_name,"<{:U('index/renwu')}>");*/
                        //return;
                        //window.setTimeout(changeShip(from_client_id),2000);
                    
                   
                }

    }

    function gag_t(uid,item_id,username,act_username){
             var url = '<{:U('index/gag_act')}>';
             //alert(item_id)
             
             var x = "";
            $("#client_list option").each(function() {
                if($(this).text() == username) {
                    x = $(this).val();
                }
            })
            var to_client_id =x;
           //alert(kros_name)
                $.getJSON(url,{'uid':uid,'item_id':item_id},function(json){
                    
                ws.send('{"type":"say","to_client_id":"all","to_client_name":"a","content":"'+username+'被房管'+act_username+'禁言"}');
                close_card()
                 }); 

        }
        
        function gag_t_cancel(uid,item_id,username,act_username){
             var url = '<{:U('index/gag_act_cancel')}>';
             //alert(item_id)
             
                $.getJSON(url,{'uid':uid,'item_id':item_id},function(json){
                    
                ws.send('{"type":"say","to_client_id":"all","to_client_name":"a","content":"'+username+'被房管'+act_username+'解除禁言"}');
                close_card()
                 }); 

        }
        
           function appointment_management(uid,item_id,username,act_username){
             var url = '<{:U('index/appointment_management_act')}>';
             //alert(item_id)
             
                $.getJSON(url,{'uid':uid,'item_id':item_id},function(json){
                    
                    if(json.ext==0){
                        alert('他尚未关注,无法任命!');
                    } else if(json.ext==1&&json.status==1){
                    
                    
                ws.send('{"type":"say","to_client_id":"all","to_client_name":"a","content":"'+username+'被主播'+act_username+'任命为房管"}');
                } else{
                alert(json.message)
                        }
             
                close_card()
                 }); 

        }
        
           function appointment_management_cancel(uid,item_id,username,act_username){
             var url = '<{:U('index/appointment_management_act_cancel')}>';
             //alert(item_id)
             
                $.getJSON(url,{'uid':uid,'item_id':item_id},function(json){
                    
                ws.send('{"type":"say","to_client_id":"all","to_client_name":"a","content":"'+username+'被主播'+act_username+'解除房管"}');
                close_card()
                 }); 

        }
        

    function say_login(from_client_id, from_client_name, content, time,agent,grade_level,is_host,is_manager){
      content=removeHTMLTag(content);
      
      var agentHtml;
        name="<{$Example_username}>"
     
      if(name!=''){
          
      if( agent=='mobile'){
          
    agentHtml='<i class="fa fa-mobile fa-1x" aria-hidden="true" style="color:#428bca"></i>'
          
      }else{
      
      
      agentHtml='<i class="fa fa-desktop fa-1x" aria-hidden="true" style="color:#428bca"></i>'
                    }
          
      }
      else{
      
      agentHtml='';
      
        }
       // b=is_identity(from_client_name,'<{$id}>')
       b=is_manager;
        if(b==1){
        identity='房管'
        } else if(is_host==1 ){
         identity='主播'
        }
        
        else{
        identity=''
        }
       code_="<a  id='"+from_client_name+ "' href='javascript:info(\""+from_client_name+ "\")' >";
        if(name!=''){
        level=' <span class="l-icon cuserlevel level-'+grade_level+' level-bgpng  level-size1_" ></span>'
        }
        $("#dialog").append('<div class="speech_item">'+agentHtml+'<span  class="identity">'+identity+'</span> '+level+code_+content+'</a>'+' </div>');
      }

      function warning(content){


         $("#dialog").append('<div class="speech_item">'+'<span  class="identity">'+'</span> '+content+'</a>'+' </div>');

      }




    function say_gag(from_client_id, from_client_name, content, time){
      content='您已被禁言';
        $("#dialog").append('<div class="speech_item"><span  class="identity">'+identity+'</span> '+content+' </div>');
    }



    $(function(){
        select_client_id = 'all';
        $("#client_list").change(function(){
             select_client_id = $("#client_list option:selected").attr("value");
        });
    });
  </script>

<script>
(function($)
{
    $.extend(
    {
        urlGet:function()
        {
            var aQuery = window.location.href.split("?");//取得Get参数
            var aGET = new Array();
            if(aQuery.length > 1)
            {
                var aBuf = aQuery[1].split("&");
                for(var i=0, iLoop = aBuf.length; i<iLoop; i++)
                {
                    var aTmp = aBuf[i].split("=");//分离key与Value
                    aGET[aTmp[0]] = aTmp[1];
                }
            }
            return aGET;
        },
    });
})(jQuery);
</script>
<script type="text/javascript" charset="UTF-8" src="__PUBLIC__/artTemplate/artTemplate.js"></script>
<script type="text/javascript" charset="UTF-8" src="__PUBLIC__/artTemplate/artTemplate-plugin.js"></script>

<script>

	function goToList(Category_id){
                $("#kros_follow,.kros_remove,.giftBox").remove();
		var url = '<{:U('index/krosCategoryList')}>';
		$.getJSON(url,{'Category_id':Category_id},function(json){
			$("#krosrow1").empty(); 
			var tag;
                        if(json==null){
                            var cryhtml = template.render('cryTemplate',1);
                            $('#krosrow1').append(cryhtml);
                        }
                        else{
                            for(var item in json)
                            {
                                    var deliveRowHtml1 = template.render('categoryTemplate',json[item]);
                                    $('#krosrow1').append(deliveRowHtml1);

                            }
                        }
		});


	}
          function  charts(){
		var url = '<{:U('index/charts')}>';
                    $.ajaxSettings.async = false; 
                    for (var i = 1; i <=3; i++) {
                           $.getJSON(url,{'chartsId':i,'type':0,'to_id':'<{$id}>'},function(json){
                                    if(json.nicheng==null||json.nicheng==''||!json.nicheng){
                                       $('#charts_'+i).css({'display':'none'});
                                           //alert(1)
                                    
                                    }
                                    else{
                                                //alert(json.portrait)
                                                //console.log(item);
                                                var chartsHtml = template.render('chartsTemplate_'+i,json);
                                                $('#charts_'+i).append(chartsHtml);

                                    }
                          });
                    }
             $.ajaxSettings.async =true; 
                        $.getJSON(url,{'chartsId':1,'type':1,'to_id':'<{$id}>'},function(json){
                                    if(json==null){
                                    }
                                    else{
                                 //   alert(json)
                                                for(var item in json)
                                                 {
                                               //alert(json[item])
                                                //console.log(item);
                                                var chartsHtml = template.render('chartsTemplate_10',json[item]);
                                                $('#charts_10').append(chartsHtml);

                                                }
                                    }
                          });
                
        }
</script>
              <script type='text/html' id='categoryTemplate'>
                      <li data-id="385390" class="video-list-item video-no-tag  col-sm-3">
              <a data-id="385390" class="video-list-item-wrap" href="<{:U('index/krosList/id/')}><%=uid%>">
                                <div class="video-cover">
                  <img alt=""  class="video-img video-img-lazy" src="__upload__/images/<%=uid%>.jpg">
                  <div class="video-overlay"></div>
                  <div class="video-play"></div>
                </div>
                <div title="" class="video-title"><%=title%> </div>
                <div class="video-info">
                  <span class="video-nickname"><%=nicheng%></span>
                  <span class="video-number"><%=ding%></span>
                                      <span class="video-cate"><%=cate_name%></span>
                                  </div>
              </a>
            </li>
            	</script>   
        
        
                <script type='text/html' id='cryTemplate'>

                    <div>

                    <img src="__PUBLIC__/img/cry.gif">

                    <p style="font-size: 18px">对不起,没有找到直播间!</p>
                    </div>

                </script>

 <script type='text/html' id='chartsTemplate_1'>

 <a href="javascript:;" class="js-nick" is-show-super-icon="0" data-ranktype="week" data-rel="user-info" avatar="avatar/006/10/66/93_avatar" rel="6106693" gid="1" data-level="15" data-noble="0" data-invisible="0" data-invisiblenick="">
            <span class="kros-avatar">
                <img src="__upload__/Portrait/<%=portrait%>"><i class="kros-icon"></i>
            </span>
            <span class="r-nick" title="CloveM"><%=nicheng%></span>
        </a>
        <span class="l-icon cuserlevel level-<%=grade_level%> level-bgpng  level-size1" data-uid="6106693" title="用户等级：15" selector="user-level"></span>
        
        </script>   

         <script type='text/html' id='chartsTemplate_2'>
         <a href="javascript:;" class="js-nick" is-show-super-icon="0" data-ranktype="week" data-rel="user-info" avatar="avanew/face/201705/17/12/9e88d0c302954feac5122e1ea82ae244" rel="63419018" gid="1" data-level="48" data-noble="4" data-invisible="0" data-invisiblenick="">
            <span class="kros-avatar">
                <img src="__upload__/Portrait/<%=portrait%>"><i class="kros-icon"></i>
            </span>
            <span class="r-nick" title=""><%=nicheng%></span>
        </a>
        <span class="noble-level">
        </span>
        <span class="l-icon cuserlevel level-<%=grade_level%> level-bgpng  level-size1" data-uid="63419018" title="" selector="user-level"></span>
            </script>  

 <script type='text/html' id='chartsTemplate_3'>
<a href="javascript:;" class="js-nick" is-show-super-icon="0" data-ranktype="week" data-rel="user-info" avatar="avatar/default/11" rel="53211322" gid="1" data-level="8" data-noble="0" data-invisible="0" data-invisiblenick="">
            <span class="kros-avatar">
                <img src="__upload__/Portrait/<%=portrait%>"><i class="kros-icon"></i>
            </span>
            <span class="r-nick" title=""><%=nicheng%></span>
        </a>
        <span class="l-icon cuserlevel level-<%=grade_level%> level-bgpng  level-size1" data-uid="53211322"  selector="user-level"></span>
  </script> 

        <script type='text/html' id='chartsTemplate_10'>
              <li class="kros kros-4"><i class="n-icon"><%=chartsId%></i>
        <span class="noble-level">
        </span>
        <span class="l-icon cuserlevel level-<%=grade_level%> level-bgpng  level-size1" data-uid="299704"  selector="user-level"></span>
        <a href="javascript:;" class="js-nick" is-show-super-icon="0" data-ranktype="week" data-rel="user-info" avatar="avanew/face/201702/21/21/1bcf3d57e49ebb236a91a2e3fd45943a" rel="299704" gid="1" data-level="33" data-noble="1" data-invisible="0" data-invisiblenick="">
            <span class="r-nick" title=""><%=nicheng%></span>
        </a>
        <span class="r-img rank-up" title=""></span>
    </li>
        </script> 


    <script type='text/html' id='followTemplate'>
  <a id="r-com-btn" class="r-com-btn follow-btn fl" href="javascript:follow('<{$Example_uid}>','<{:U('Login/')}>',0);" title="关注" data-anchor-info="follow"><i id="icon-heart" class="icon-heart"></i><span id="follow">关注</span></a>
                            <p class="r-num fl">
                                <span data-anchor-info="nic"><%=ext%></span>
                            </p>
 </script> 
<script type='text/html' id='followTemplate_'>
    <a id="r-com-btn" class="r-com-btn follow-btn fl follow" href="javascript:follow('2','/Login/',1);" title="关注" data-anchor-info="follow"><i id="icon-heart" class=""></i><span id="follow" style="padding-left: 20px;">已关注</span></a>

   <p class="r-num fl">
                                <span data-anchor-info="nic"><%=ext%></span>
                            </p>
 </script> 
<script type='text/html' id='cardTemplate'>
    <div class="chat-user-card-wrap   lv--0"><a class="card-close" href="javascript:close_card();" data-type="closecard">×</a>
        <div class="chat-user-card">
            <div class="user-card-main clearfix">
                <div class="user-card-widget-tl"></div>
                <div class="user-card-widget-br"></div>
                <div class="user-card-title">
                    <h1><%=username%></h1>
                    <strong class="user-card-badge">
                        <span>
                            <span class="user-level level-<%=grade_level%>  level-size1 level-bgpng   lve-icon-1to9  "></span>
                        </span>
                    </strong>
                </div>
            </div>
            <div class="user-card-action">
                <div class="user-card-action-inr">
<a class="action-item" data-type="toreport" clt="0" rel="142774332" gid="1" chatid="191f9511c367477e771e050000000000" nickname="dogegg123">举报用户</a>
 

                           <a class="action-item" data-type="shield" href="javascript:;" rel="0"><i class="icon pb-icon"></i>屏蔽用户</a>


<%if (role==2&&is_gag==0){%>
<%if (is_manager==1){%>

            <a class="action-item" data-type="appoint" href="javascript:appointment_management_cancel(<%=uid%>,<{$id}>,'<%=username%>','<%=act_username%>');" >解除房管</a>
 <%} else {%>
                            <a class="action-item" data-type="appoint" href="javascript:appointment_management(<%=uid%>,<{$id}>,'<%=username%>','<%=act_username%>');" >任命房管</a>
 <%}%>
 <%}%>
<%if (is_gag==0&&host==0){%>
<%if ((role==1||role==2)&&role!=3&&is_manager==0){%>
                            <a class="action-item" data-type="mute" href="javascript:gag_t(<%=uid%>,<{$id}>,'<%=username%>','<%=act_username%>')">禁止发言</a>
 <%}%>
<%}%>
<%if (is_gag==1){%>
<%if ((role==1||role==2)&&role!=3){%>
                            <a class="action-item" data-type="mute" href="javascript:gag_t_cancel(<%=uid%>,<{$id}>,'<%=username%>','<%=act_username%>')">解除禁言</a>
 <%}%>
<%}%>


                    <a class="action-item" data-type="sendletter" href="/member/pm" rel="142774332" target="_blank">
                        <span>发站内信</span>
                    </a>
                </div>
            </div>
        </div>
    </div>
</script> 
	</head>

	<body onload="connect();">

<div class="chat-user-card-holder" style="display:none" id='chat-user-card-holder'>

</div>

        <!-- 代码 开始 -->
<div style="display:block;" id="rocket-to-top">
	<div style="opacity:0;display:block;" class="level-2"></div>
	<div class="level-3"></div>
</div>
        
        <div style="display:block;" id="rocket-to-top1">
	<div style="opacity:0;display:block;" class="level-2"></div>
	<div class="level-3"></div>
</div>
<!-- 代码 结束 -->

		<div class="navbar navbar-default" id="navbar"  style="margin-bottom:0">
			<script type="text/javascript">
				try{ace.settings.check('navbar' , 'fixed')}catch(e){}
			</script>

			<div class="navbar-container" id="navbar-container">
				<div class="navbar-header pull-left">
					<a href="<{:U('c/i')}>" class="navbar-brand">
						<small>
							  <img style="width: 266px; height: auto;" alt="VideoTouch" src="__PUBLIC__/img/logo.png">
							
						</small>
					</a><!-- /.brand -->
<ul class="head-nav fl">
			<li class="fl index ">
				<a href="/">首页</a>
			</li>
			<li class="fl live ">
				<a href="<{:U('d/a')}>">直播</a>
			</li>
			<li class="fl assort">
				<a href="<{:U('d/c')}>">分类</a>
                <i></i><div class="a-pop">
    <i></i>

    <div class="a-list">
                <h3>热门分类</h3>
        <ul class="btns">
                        <li><a target="_blank" class="btn" href="<{:U('d/a')}>">英雄联盟</a></li>
                                <li><a target="_blank" class="btn" href="<{:U('d/a')}>">炉石传说</a></li>
                                <li><a target="_blank" class="btn" href="<{:U('d/a')}>">DOTA2</a></li>
                                <li><a target="_blank" class="btn" href="<{:U('d/a')}>">主机游戏</a></li>
                                <li><a target="_blank" class="btn" href="<{:U('d/a')}>">守望先锋</a></li>
                                <li><a target="_blank" class="btn" href="<{:U('d/a')}>">绝地求生</a></li>
                            </ul>
                    <div class="btn-all">
            <a target="_blank" href="<{:U('d/c')}>">全部&gt;&gt;</a>
        </div>
    </div>
</div>
            </li>
            <li class="fl funny ">
                <a href="/charts_list" target="_blank">排行榜</a>
                <span class="g_hot_icon"></span>
                
<i></i>

            </li>
            <li class="fl wxr-menu status-hidden">
                <a href="javascript:;" target="_blank"></a>
                <span class="wxr-hot-icon"><img src=""></span>
            </li>
        </ul>
				</div><!-- /.navbar-header -->

				<div class="navbar-header pull-right" role="navigation">
					<ul class="nav ace-nav">
						
<if condition="$Example_uid!=''">
						<li class="light-blue">
              <a data-toggle="dropdown" href="#" class="dropdown-toggle">
              
                <span class="user-info">
                  <small>Welcome,</small>
                  <{$Example_username}> 
                </span>

                <i class="icon-caret-down"></i>
              </a>

              <ul class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
                <li>
                  <a href="<{:U('Member/')}>">
                    <i class="icon-user"></i>
                    个人中心
                  </a>
                </li>

                <li class="divider"></li>
 <form action="<{:U('Login/logout')}>" name="logout_form" method="post">
                <input type="hidden" name="refer" id="refer" value="123">  

                </form>
                <li>
                  <a href="javascript:document:logout_form.submit();">
                    <i class="icon-off"></i>
                    退出
                  </a>
                </li>
              </ul>
            </li>
    <else /> 

     <form action="<{:U('Login/')}>" name="login_form" method="post">
                                                       <input type="hidden" name="refer" id="refer" value="123">  
                                                       
                                                   </form>

<div><a href="javascript:follow('<{$Example_uid}>','<{:U('Login/')}>');" id="ts-show-login-modal1">登录</a></div>
<div><a href="javascript:follow('<{$Example_uid}>','<{:U('Login/')}>');" id="ts-show-register-modal1">或 <span>注册</span></a></div>

         </if>
						

						
					</ul><!-- /.ace-nav -->
				</div><!-- /.navbar-header -->
			</div><!-- /.container -->
		</div>

		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>

			<div class="main-container-inner">
				<a class="menu-toggler" id="menu-toggler" href="#">
					<span class="menu-text"></span>
				</a>

				<div class="sidebar" id="sidebar">
					<script type="text/javascript">
						try{ace.settings.check('sidebar' , 'fixed')}catch(e){}
					</script>

					<!-- #sidebar-shortcuts -->

					<ul class="nav nav-list">
						<li class="active">
							<a href="#"  id="sidebar-collapse1">
								<i class="icon-dashboard"></i>
								<span class="menu-text"> 精彩分类 </span>
							</a>
						</li>

						<li class="newList">

						<ul class="sidebar-list sidebar-list-2 clearfix "  style="margin:0" id="krosrow">

                               
             
                                  </ul>


	<script type='text/html' id='deliveInfoTemplate'>

			<li data-ename="cartoon"  class="cartoon">
							 <a href="javascript:goToList('<%=cate_id%>');" target="_top">
							<%=cate_name%>                 </a>
							</li>

		
		</script>

							
						</li>

						

						
					</ul><!-- /.nav-list -->

					<div class="sidebar-collapse" id="sidebar-collapse">
						<i class="icon-double-angle-left" onclick="close_panel();" data-icon1="icon-double-angle-left" data-icon2="icon-double-angle-right"></i>
					</div>

					<script type="text/javascript">
						try{ace.settings.check('sidebar' , 'collapsed')}catch(e){}
					</script>
				</div>

				<div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						<script type="text/javascript">
							try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
						</script>

						<ul class="breadcrumb">
							<li>
								<i class="icon-home home-icon"></i>
								<a href="<{:U('c/i')}>">主页</a>
							</li>
							<li class="active">正在直播</li>
						</ul><!-- .breadcrumb -->

						<div class="nav-search" id="nav-search">
                                                    <form class="form-search" method="post" action="<{:U('index/search')}>">
								<span class="input-icon">
									<input type="text" name="key_word" placeholder="h1z1" class="nav-search-input" id="nav-search-input" autocomplete="off" />
									<i class="icon-search nav-search-icon"></i>
								</span>
<span class="input-icon">
                                                                        <button class="btn btn-minier btn-yellow" style="margin-bottom:5px">搜索 </button>
</span>

							</form>
						</div><!-- #nav-search -->
					</div>

					<div class="page-content bg_h">
					

						<div class="row bg_h" id="krosrow1">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->


								<div class="row">
									<div class="space-6"></div>

									<div id="player_" class="col-sm-7 ">
										
<h1 class="mg0">
                                                <div class="giftBox">
								<div class="col-sm-2 pd0"  ><img style="width:100px;height:88px" src=" __upload__/Portrait/<{$portrait}> "></div>
								<div class="col-sm-10 pd0">
<div class="col-sm-12" style="height:0px"></div>
<div class="col-sm-8 pd0">
    <div class="col-sm-12 h20">
                    <small >
                    <{$title}> 
                    </small>
    </div>
 <div class="col-sm-12 h20">
            <span class="f12" >
                              <{$cate_name}> 
             </span>
    </div>
    <div class="col-sm-12">
        <span class="f12 mgr20" >
                           <{$nick_name}>
         </span>
                <small class="kros_remove wd100 inb f14">
                <i class="fa fa-eye" aria-hidden="true" title="人气值"></i>
                <a class="num-v" id="num-v" data-anchor-info="ol-num" >0</a>
                </small>

                           <small class="kros_remove wd100 inb " style="font-size:14px">
                <i class="fa fa-circle org" aria-hidden="true" title="主播体重"></i>
                <a class="num-v" data-anchor-info="ol-num" ><{$gains}></a>kg
                </small>
    </div>
</div>


                                <label class="pull-right inline mgt10" id="kros_follow">
											
                                            </label>


<div class="sq-wrap">
    <!-- 分享按钮 -->
    <div id="share-content" class="share-box fl clearfix out">
        <p class="tit">
            <em class="share-icon"></em>
            <span>分享</span>
        </p>
        <div class="con hide" data-share-content="content"> <i class="arrow-icon"></i>
            <div class="share-more clearfix">
                <div class="share-third-list">
                    <h3 class="h3">呼唤小伙伴们前来围观吧</h3>
                    <div class="s-more" data-share-btn="more">
                        <ul class="trd-ullist clearfix">
                            <li>
                                <a class="sm1" href="javascript:;" title="分享到新浪微博" data-to="tsina" target="_blank"></a>
                            </li>
                            <li>
                                <a class="sm4" href="javascript:;" title="分享到QQ" data-to="cqq" target="_blank"></a>
                            </li>
                            <li>
                                <a class="sm3" href="javascript:;" title="分享到QQ空间" data-to="qzone" target="_blank"></a>
                            </li>

                        </ul>
                    </div>
                </div>
                <div class="wx-qcode">
                    <div class="wxqrimgbg">
                        <div class="wxqrimg"></div>
                        <i class="wex-icon"></i>
                    </div>
                    <p>
                        微信扫码分享
                    </p>
                </div>
            </div>
            <div class="addr">
                <div class="tt">
                    <ul>
                        <li class="hover" data-share-path="url">直播间地址</li>
                        <li data-share-path="flash">flash地址</li>
                        <li data-share-path="embed">通用代码</li>
                    </ul>
                </div>
                <div class="s-box">
                    <div class="cc" style="display:block;">
                        <input class="inn" name="" id="js_page_url" data-share-input="path" value="" readonly="" size="30" type="text">
                        <a href="javascript:;" id="share-copy-btn" class="s_copy btn" data-share-copy="btn">复制链接</a>
                    </div>
                </div>
            </div>

        </div>
    </div>

    <!-- app扫一扫 -->
    <div id="qrcode-content" class="qrcode-box fl out">
        <p class="tit">
            <em class="qrcode-icon"></em>
            <a href="/client" target="_blank">手机看直播</a>
        </p>
        <div class="con clearfix hide" data-qrcode-content="content"> <i class="arrow-icon"></i>
            <div class="q-app-box fl">
                <h3>
                    <span>手机看直播，畅享超清画质</span>
                    <a class="download clearfix fr" href="/client" target="_blank"><i class="down-icon "></i><span class="down-text ">下载斗鱼app</span></a>
                </h3>
                <p class="q-des">斗鱼app扫描二维码，<a class="highlight">继续观看</a>精彩直播</p>
                <div class="q-ewm clearfix">
                    <div class="q-ewm-fl fl">
                        <span>1.点击APP右上方“扫一扫”</span>
                        <img src="1.png?v=20160602" alt="" data-qrcode-img="saoyisao">
                    </div>
                    <div class="q-ewm-fr fr">
                        <span>2.对准下方二维码</span>
                        <div class="qrcodebg"> <b data-qrcode-img="img"></b> 
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


</div></div>	
							</h1>
								
          
  
<!-- 	<iframe  frameborder=0 width="100%" height="100%" frameborder="0" class="kros_ifra" src="http://www.huya.com/485044468"></iframe> -->

<!--酷播优酷插件代码/开始-->
<!-- 
<script type="text/javascript" src="http://web.mcooz.com/player/images/swfobject.js"></script> 
<div id="CuPlayer" class="video" ><img src="http://web.mcooz.com/player/images/loading.gif" width="20" height="20" /> 播放器加载中,请稍等...</div>

<script type="text/javascript">
var so = new SWFObject("http://web.mcooz.com/Player/player.swf","ply","800","500","9","#000000");
so.addParam("allowfullscreen","true");
so.addParam("allowscriptaccess","always");
so.addParam("wmode","opaque");
so.addParam("quality","high");
so.addParam("salign","lt");

so.addVariable("JcScpServer","rtmp://115.28.161.7/live"); //服务器地址
//so.addVariable("JcScpVideoPath","kros"); //发布点名称
so.addVariable("JcScpVideoPath","<{$id}>"); //发布点名称



//so.addVariable("JcScpServer","rtmp://202.117.80.19:1935/live/"); //服务器地址
//so.addVariable("JcScpVideoPath","live2"); //发布点名称

so.addVariable("JcScpImg","http://web.mcooz.com/player/Images/flashChangfa2.jpg");
//so.addVariable("JcScpFile","http://web.mcooz.com/player/CuSunV2Set.asp");


so.write("CuPlayer");
</script>-->

<div id="id_video_container" style="width:100%; height:auto;"></div>
<script src="//qzonestyle.gtimg.cn/open/qcloud/video/live/h5/live_connect.js" charset="utf-8"></script>
<script type="text/javascript">
playerWidth_=$("#player_").width();(function(){var a=new qcVideo.Player("id_video_container",{"live_url" : "rtmp://457849.ichengyun.net/live/<{$id}>",
"live_url2" : "http://457849.ichengyun.net/live/<{$id}>.m3u8",width:749,height:408})})();
</script>
  <div class="giftBox"  >
                                        <ul class="liwu">
                                        <li class="artillery" onclick="ship('<{$Example_uid}>','<{:U('Login/')}>', '<{$id}>',2)" >
                                            <img class="g-img" src="__PUBLIC__/images/artillery.jpg" alt=""></li>

                                        <li class="plane" onclick="ship('<{$Example_uid}>','<{:U('Login/')}>', '<{$id}>',3)" ><img class="g-img" src="__PUBLIC__/images/plane.jpg" alt=""></li>
                                        <li class="ship" onclick="ship('<{$Example_uid}>','<{:U('Login/')}>', '<{$id}>',5)" ><img class="g-img" src="__PUBLIC__/images/ship.jpg" alt=""></li>
                                        <li class="huojian" onclick="ship('<{$Example_uid}>','<{:U('Login/')}>', '<{$id}>',1)"><img class="g-img" src="__PUBLIC__/images/rocket.jpg" alt=""></li>
                                        <li class="Atlantis" onclick="ship('<{$Example_uid}>','<{:U('Login/')}>', '<{$id}>',4)"><img class="g-img" src="__PUBLIC__/images/shuttle.jpg" alt=""></li>
                                        <!--<li class="huojian" onclick="onSubmit1('<{$Example_uid}>','<{:U('Login/')}>', '<{:U('index/giveGift')}>', '<{$id}>',1);"><img class="g-img" src="__PUBLIC__/images/rocket.jpg" alt=""></li>
                                        <li class="Atlantis" onclick="onSubmit2('<{$Example_uid}>','<{:U('Login/')}>', '<{:U('index/giveGift')}>', '<{$id}>',4);"><img class="g-img" src="__PUBLIC__/images/shuttle.jpg" alt=""></li>-->
                                                    
                                                   
                                                    
                                                    	
                                        </ul>	 <div class="container"  >
                                                    <div class="col-sm-8"  ></div>

<small class="kros_remove wd100 inb fl " style="font-size:14px">
                <i class="fa fa-circle org mgr5" aria-hidden="true" title=""></i>
                虾球<a class="num-v mgl5" data-anchor-info="ol-num"><{$balance}></a>
                </small>
                            <div class="col-sm-2" style="padding-right:0" >
                          <a class="r-com-btn getYc fr" href="javascript:charge('<{$Example_uid}>','<{:U('Login/')}>','<{:U('Member/charge')}>');" >充值</a>
                           </div>


                                                </div>
                                                </div>

					<div class="" style="background:#fff">
                                            <h4 class="now_status">Ta的动态</h4>

                                            <hr>
										
<h3 class="nick_name"><img style="width:40px;height:auto;border-radius:50%" src=" __upload__/Portrait/<{$portrait}> "> <{$nick_name}></h3>
<div class="hr hr10 hr-dotted"></div>
<div class="box2" id="content">
<volist name="list" id="vo" key="k">
<div class="box1" id="hproduct">
<p class="subject">
       <{$vo.subject}>  <span class="fr date"><{$vo.dateline|date='Y-m-d H:i:s',###}></span>

</p>
<div class="div_img">
 <volist name="vo['img']" id="baf" >
<img src="<{$baf}>" alt="" class='sub_img'>
</volist>                                                                                                                                                                                                       

</div>


<php>
$kn=$vo[p];
$kn=($kn-1)*6+$k;                                                                                                                                                                                                      
</php>
<div class="reply" id="<php>echo "content".$kn;</php>">
<volist name="vo['reply']" id="f" key="k1">
 <p id="<php>echo "hproduct".$kn;</php>"><span class="author"><{$f['author']}></span>：<{$f['message']}></p>



 </volist>
</div>
<div class="kr"> <div id="<php>echo "navigation".$kn;</php>"><a  href="http://www.mcooz.com/index/get_post/tid/<{$vo.tid}>/p/2">+查看更多评论</a></div></div>


</div>
</volist>


</div>

<div class="kr"> <div id="navigation"><a  href="http://www.mcooz.com/index/krosList/p/2/id/<{$id}>">+查看更多动态</a></div></div>

<!--										<h5>加油</h5>-->
									</div>				
                                    </div>



									<div class="vspace-sm"></div>

									<div class="col-sm-5"  >


									 <!-- chatStart -->
                                                                                <div class="">
                                                                           <div class="row clearfix">
                                                                               <div class="col-md-1 column">
                                                                               </div>
                                                                               <div class="col-md-11 column" >
                                                                <div class="fans-rank">
                                                                <div class="fans-list">
                                                                   <div class="tabbable">
											<ul class="nav nav-tabs" id="myTab">
												<li class="active col-md-6 column" style="padding:0">
													<a data-toggle="tab" href="#home">
														<i class="green icon-flag bigger-110"></i>
														贡献周榜
													</a>
												</li>

												<li class="col-md-6 column" style="padding:0">
													<a data-toggle="tab" href="#profile">
                                                                                                                    <i class="orange icon-flag-checkered bigger-110"></i>
														贡献总榜
														
													</a>
												</li>

											
											</ul>

											<div class="tab-content">
												<div id="home" class="tab-pane active">
													<ul class="r-list clearfix" data-type="list">
    <li class="kros contribution kros-1" id="charts_2">
       
    </li>
    <li class="kros contribution kros-2" id="charts_1">
       
    </li>
    <li class="kros contribution kros-3" id="charts_3">
        
    </li>
<div id="charts_10">
  
 </div>
</ul>
												</div>

												<div id="profile" class="tab-pane">
													<p></p>
												</div>

												
											</div>
										</div>
</div>
</div>
               <div class="thumbnail">
                   <div class="caption" id="dialog" style="height:400px;overflow:scroll; overflow-x:hidden;"></div>
               </div>
<div class="chat-feat clearfix">
               <form onsubmit="onSubmit('<{$Example_uid}>','<{:U('Login/')}>','<{$id}>'); return false;">
                    <select style="margin-bottom:8px;display:none" id="client_list" >
                        <option value="all">所有人</option>
                    </select>
                    <textarea 

<if condition="$Example_uid==''">
  disabled="disabled" readonly="readonly"                                                                                       
</if>

class="textarea thumbnail" id="textarea" onkeydown="if(event.keyCode==13){checkEnter(event);onSubmit('<{$Example_uid}>','<{:U('Login/')}>','<{$id}>');}"></textarea>
           
<if condition="$Example_uid==''">
 <p class="login-inside login-inside-nologbor" data-type="log"><a class="is-log" href="javascript:follow('<{$Example_uid}>','<{:U('Login/')}>');" data-type="login">登录</a>发弹幕，参与主播互动</p>   
</if>
     
<div class="say-btn">

<input type="submit" class="btn btn-default" value="发送" />




</div>
               </form>
                    </div>

            </div>
            <div class="col-md-3 column"   style="display:none">
               <div class="thumbnail">
                   <div class="caption" id="userlist"></div>
               </div>
               <a href="#" target="_blank"><img style="width:252px;margin-left:5px;" src="__PUBLIC__/img/logo.png"></a>
            </div>
        </div>
    </div>

 <!-- chatEnd -->

								
									</div><!-- /span -->
								</div><!-- /row -->

								<div class="hr hr32 hr-dotted"></div>

								<div class="row">
									<div class="col-sm-12">
										<div class="widget-box transparent">
										

											<div class="widget-body">
												<div class="widget-main no-padding">
													
												</div><!-- /widget-main -->
											</div><!-- /widget-body -->
										</div><!-- /widget-box -->
									</div>

								
								</div>

								<div class="hr hr32 hr-dotted"></div>

								

								<!-- PAGE CONTENT ENDS -->
							</div><!-- /.col -->
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div><!-- /.main-content -->

			</div><!-- /.main-container-inner -->

			
		</div><!-- /.main-container -->

		<!-- basic scripts -->

		<!--[if !IE]> -->

		<script type="text/javascript">
			window.jQuery || document.write("<script src='__PUBLIC__/assets/js/jquery-2.0.3.min.js'>"+"<"+"/script>");
		</script>

		<!-- <![endif]-->

                <!--[if IE]>
                <script type="text/javascript">
                 window.jQuery || document.write("<script src='__PUBLIC__/assets/js/jquery-1.10.2.min.js'>"+"<"+"/script>");
                </script>
                <![endif]-->

		<script type="text/javascript">
			if("ontouchend" in document) document.write("<script src='__PUBLIC__/assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
		</script>
		<script src="__PUBLIC__/assets/js/bootstrap.min.js"></script>
		<script src="__PUBLIC__/assets/js/typeahead-bs2.min.js"></script>

		<!-- page specific plugin scripts -->

		<!--[if lte IE 8]>
		  <script src="__PUBLIC__/assets/js/excanvas.min.js"></script>
		<![endif]-->

		<script src="__PUBLIC__/assets/js/jquery-ui-1.10.3.custom.min.js"></script>
		<script src="__PUBLIC__/assets/js/jquery.ui.touch-punch.min.js"></script>
		<script src="__PUBLIC__/assets/js/jquery.slimscroll.min.js"></script>
		<script src="__PUBLIC__/assets/js/jquery.easy-pie-chart.min.js"></script>
		<script src="__PUBLIC__/assets/js/jquery.sparkline.min.js"></script>
		<script src="__PUBLIC__/assets/js/flot/jquery.flot.min.js"></script>
		<script src="__PUBLIC__/assets/js/flot/jquery.flot.pie.min.js"></script>
		<script src="__PUBLIC__/assets/js/flot/jquery.flot.resize.min.js"></script>

		<!-- ace scripts -->

		<script src="__PUBLIC__/assets/js/ace-elements.min.js"></script>
		<script src="__PUBLIC__/assets/js/ace.min.js"></script>
                <script src="__PUBLIC__/js/list_.js"></script>

<php>
for ($i = 1; $i < 10; $i++) {
</php>
<script type='text/javascript'>
var _renderItem = function(data) {
		return "<p><span class='author'>" + data.author + "</span>："+ data.message + "</p>"
	}
        
	
      $('#<php>echo "content".$i;</php>').infinitescroll({
		navSelector  	: "#<php>echo "navigation".$i;</php>",
		nextSelector 	: "#<php>echo "navigation".$i;</php> a:last",
		itemSelector 	: "#<php>echo "hproduct".$i;</php>",
		debug		 	: true,
		dataType	 	: 'json',
                appendCallback	: false,
                loading: {           

                finishedMsg: "<em>没有了</em>",
                msgText: "<em >加载更多..</em>",
                    }
    },function( response ) {
    	var jsonData = response;
        $theCntr = $("#<php>echo "content".$i;</php>");
        var newElements = "";
//var newItems = new Array();
        for(var i=0;i<jsonData.length;i++) {
        var item = $(_renderItem(jsonData[i]));
        //item.css({ opacity: 0 });
        $theCntr.append(item);
        //newItems.push(item.attr('id'));
        }
//_addMasonryItem(newItems);
});
    
jQuery(window).unbind('.infscr');

$("body").delegate("#<php>echo "navigation".$i;</php> a","click",function(){
//$('#<php>echo "navigation".$i;</php> a').live('click', function(){
//$("div").delegate("#<php>echo "content".$i;</php>","",infinitescroll('retrieve'){});  
$('#<php>echo "content".$i;</php>').infinitescroll('retrieve');
$('#<php>echo "navigation".$i;</php>').show();
return false;
});               
                    
</script>
<php>
}
</php>
		<script type="text/javascript">
			jQuery(function($) {

    window.setInterval("clearB()", 2000);

     window.setInterval("clearE()", 10000);
                  
document.onkeydown=function(){
var e=window.event||arguments[0];
if(e.keyCode==123){
return false;
}else if((e.ctrlKey)&&(e.shiftKey)&&(e.keyCode==73)){
return false;
}
};
document.oncontextmenu=function(){
return false;
}
				$('.easy-pie-chart.percentage').each(function(){
					var $box = $(this).closest('.infobox');
					var barColor = $(this).data('color') || (!$box.hasClass('infobox-dark') ? $box.css('color') : 'rgba(255,255,255,0.95)');
					var trackColor = barColor == 'rgba(255,255,255,0.95)' ? 'rgba(255,255,255,0.25)' : '#E2E2E2';
					var size = parseInt($(this).data('size')) || 50;
					$(this).easyPieChart({
						barColor: barColor,
						trackColor: trackColor,
						scaleColor: false,
						lineCap: 'butt',
						lineWidth: parseInt(size/10),
						animate: /msie\s*(8|7|6)/.test(navigator.userAgent.toLowerCase()) ? false : 1000,
						size: size
					});
				})
			
				$('.sparkline').each(function(){
					var $box = $(this).closest('.infobox');
					var barColor = !$box.hasClass('infobox-dark') ? $box.css('color') : '#FFF';
					$(this).sparkline('html', {tagValuesAttribute:'data-values', type: 'bar', barColor: barColor , chartRangeMin:$(this).data('min') || 0} );
				});
			
			
			
			
			  var placeholder = $('#piechart-placeholder').css({'width':'90%' , 'min-height':'150px'});
			  var data = [
				{ label: "social networks",  data: 38.7, color: "#68BC31"},
				{ label: "search engines",  data: 24.5, color: "#2091CF"},
				{ label: "ad campaigns",  data: 8.2, color: "#AF4E96"},
				{ label: "direct traffic",  data: 18.6, color: "#DA5430"},
				{ label: "other",  data: 10, color: "#FEE074"}
			  ]
			  function drawPieChart(placeholder, data, position) {
			 	  $.plot(placeholder, data, {
					series: {
						pie: {
							show: true,
							tilt:0.8,
							highlight: {
								opacity: 0.25
							},
							stroke: {
								color: '#fff',
								width: 2
							},
							startAngle: 2
						}
					},
					legend: {
						show: true,
						position: position || "ne", 
						labelBoxBorderColor: null,
						margin:[-30,15]
					}
					,
					grid: {
						hoverable: true,
						clickable: true
					}
				 })
			 }
			 drawPieChart(placeholder, data);
			
			 placeholder.data('chart', data);
			 placeholder.data('draw', drawPieChart);
			
			
			
			  var $tooltip = $("<div class='tooltip top in'><div class='tooltip-inner'></div></div>").hide().appendTo('body');
			  var previousPoint = null;
			
			  placeholder.on('plothover', function (event, pos, item) {
				if(item) {
					if (previousPoint != item.seriesIndex) {
						previousPoint = item.seriesIndex;
						var tip = item.series['label'] + " : " + item.series['percent']+'%';
						$tooltip.show().children(0).text(tip);
					}
					$tooltip.css({top:pos.pageY + 10, left:pos.pageX + 10});
				} else {
					$tooltip.hide();
					previousPoint = null;
				}
				
			 });
			
			
			
			
			
			
				var d1 = [];
				for (var i = 0; i < Math.PI * 2; i += 0.5) {
					d1.push([i, Math.sin(i)]);
				}
			
				var d2 = [];
				for (var i = 0; i < Math.PI * 2; i += 0.5) {
					d2.push([i, Math.cos(i)]);
				}
			
				var d3 = [];
				for (var i = 0; i < Math.PI * 2; i += 0.2) {
					d3.push([i, Math.tan(i)]);
				}
				
			
				var sales_charts = $('#sales-charts').css({'width':'100%' , 'height':'220px'});
				$.plot("#sales-charts", [
					{ label: "Domains", data: d1 },
					{ label: "Hosting", data: d2 },
					{ label: "Services", data: d3 }
				], {
					hoverable: true,
					shadowSize: 0,
					series: {
						lines: { show: true },
						points: { show: true }
					},
					xaxis: {
						tickLength: 0
					},
					yaxis: {
						ticks: 10,
						min: -2,
						max: 2,
						tickDecimals: 3
					},
					grid: {
						backgroundColor: { colors: [ "#fff", "#fff" ] },
						borderWidth: 1,
						borderColor:'#555'
					}
				});
			
			
				$('#recent-box [data-rel="tooltip"]').tooltip({placement: tooltip_placement});
				function tooltip_placement(context, source) {
					var $source = $(source);
					var $parent = $source.closest('.tab-content')
					var off1 = $parent.offset();
					var w1 = $parent.width();
			
					var off2 = $source.offset();
					var w2 = $source.width();
			
					if( parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2) ) return 'right';
					return 'left';
				}
			
			
				$('.dialogs,.comments').slimScroll({
					height: '300px'
			    });
				
				
				var agent = navigator.userAgent.toLowerCase();
				if("ontouchstart" in document && /applewebkit/.test(agent) && /android/.test(agent))
				  $('#tasks').on('touchstart', function(e){
					var li = $(e.target).closest('#tasks li');
					if(li.length == 0)return;
					var label = li.find('label.inline').get(0);
					if(label == e.target || $.contains(label, e.target)) e.stopImmediatePropagation() ;
				});
			
				$('#tasks').sortable({
					opacity:0.8,
					revert:true,
					forceHelperSize:true,
					placeholder: 'draggable-placeholder',
					forcePlaceholderSize:true,
					tolerance:'pointer',
					stop: function( event, ui ) {
						$(ui.item).css('z-index', 'auto');
					}
					}
				);
				$('#tasks').disableSelection();
				$('#tasks input:checkbox').removeAttr('checked').on('click', function(){
					if(this.checked) $(this).closest('li').addClass('selected');
					else $(this).closest('li').removeClass('selected');
				});
			})
        var  playerWidth=parseInt($("embed").width());
        $(".giftBox,#id_video_container").css({ width:playerWidth});

       // window.setInterval(function(){goneShip("<{:U('index/q_renwu')}>");},5000);                          
        var url = '<{:U('index/krosCategory')}>';
	$.getJSON(url,{'long':1},function(json)	{
	for(var item in json){
			var deliveRowHtml = template.render('deliveInfoTemplate',json[item]);
			$('#krosrow').append(deliveRowHtml);
		}
	});
        charts();
        follow_inti();
        $("#refer").val(window.location.href);

 function charge(uid,urlVal,charge_url) {
 if(uid==''){           
                art.dialog.open(urlVal, {
                title: '登录',
                });
                $('.aui_state_focus').css({zIndex: 99999 });
                $('input[name="refer"]').val("{$refer}");
                
                }else{
           window.location.href=charge_url; 
            }}
        function follow(uid,urlVal,type) {
                if(uid==''){
                art.dialog.open(urlVal, {
                title: '登录',
                });
                $('.aui_state_focus').css({zIndex: 99999 });
                $('input[name="refer"]').val("{$refer}");
                }
                else{
                
                        if(type==0){

                            var url = '<{:U('index/follow_act')}>';
                           $.getJSON(url,{'uid':'<{$Example_uid}>','item_id':'<{$id}>'},function(json){
                         if(json.status==1){    var followHtml = template.render('followTemplate_',json);
                            $('#kros_follow').empty().append( followHtml); }
                           });   
                        }else{
                       var url = '<{:U('index/follow_act_cancel')}>';
                        $.getJSON(url,{'uid':'<{$Example_uid}>','item_id':'<{$id}>'},function(json){
                            if(json.status==1){
                        var followHtml = template.render('followTemplate',json);
			  $('#kros_follow').empty().append( followHtml);
                            }
                       
                           });  

                        }
                    
                 
                
                }
        }

        function follow_act(){
            $("#icon-heart").removeClass('icon-heart');
            $("#follow").html('已关注');
            $("#r-com-btn").addClass('follow');
            $("#follow").css({ paddingLeft:"20px"});
        }
        
         function follow_act_cancel(){
            $("#icon-heart").addClass('icon-heart');
            $("#follow").html('关注');
            $("#r-com-btn").removeClass('follow');
            //$("#follow").css({ paddingLeft:"20px"});
        }
        
        
        function follow_inti(){
        
          var url = '<{:U('index/follow_query')}>';
                $.getJSON(url,{'uid':'<{$Example_uid}>','item_id':'<{$id}>'},function(json){
                    
                    
                    if(json.status==0){
                        var followHtml = template.render('followTemplate',json);
			$('#kros_follow').append( followHtml);
                        
                    
                        
                    }else{
                    
                    var followHtml = template.render('followTemplate_',json);
			$('#kros_follow').append( followHtml);
                                    }

                });   
          
        }
        function shipGift(shipCount,fromId){
       // alert(shipCount)
       
          shipCount=shipCount.toString();
                arr = (shipCount+'').split('')
                //alert(arr[0]);   
                //alert(arr.length)
                chatWidth=parseInt($(".thumbnail").width())+10;
                if(arr.length==1){
                $('#dialog').append('<div class="s_sh" id="s_sh_'+fromId+'"><div class="nbox" id="nbox"><span class="n sign"></span><span id="shipCount" class="n n'+shipCount+'"></span></div> </div>');
                }
                if(arr.length==2){
                single=arr[1];
                $('#dialog').append('<div class="s_sh" id="s_sh_'+fromId+'"><div class="nbox" id="nbox"><span class="n sign"></span><span class="n n1"></span><span id="shipCount" class="n n'+single+'"></span></div> </div>');
                }
                $("#s_sh_"+fromId).css({ position:"absolute",top:rd(100,500),left:"13px",width:"0px",height:"40px"});
                $("#s_sh_"+fromId).animate({width:chatWidth},1);
        }
        
        function changeShipCount(i){  
                i=i.toString();
                arr = (i+'').split('')
                if(arr.length==1){
                $('#shipCount').removeClass("n"+(i-1)).addClass("n"+i);
                }
                if(arr.length==2){
                 single=arr[1];
                 ten=arr[0];
                if(i=="10"){
                   $("#shipCount").removeClass("n9").addClass("n0");
                   $("#shipCount").before('<span class="n n1" id="ten"></span>');                    
                    
                }else   {
                
                       $('#ten').removeClass("n"+(ten-1)).addClass("n"+ten);
                        $('#shipCount').removeClass("n"+(single-1)).removeClass("n9").addClass("n"+single); 
                        }
                }
        }

        function doGone(){
                //window.setTimeout(gone,2000);
                gone();
        }
                                
                                
        function gone(id){
                $("#s_sh_"+id).animate({width:'0'},1,function (){
                $(this).remove();
                $(".n").remove();
                });
        }
                                

        function ship(uid, urlVal,to_id,gift_id){
           if(uid==''){
                art.dialog.open(urlVal, {
                title: '登录',
                });
                $('input[name="refer"]').val("{$refer}");
                }
              else{  
                var input ="送出了一个轮船!";
                open_[1]=1;
                var ship=1
                var to_client_id = $("#client_list option:selected").attr("value");
                var to_client_name = $("#client_list option:selected").text();
                ws.send('{"type":"say","ship":1,"uid":"'+uid+'","to_id":"'+to_id+'","gift_id":"'+gift_id+'","shipCount":1,"to_client_id":"all","to_client_name":"'+to_client_name+'","content":"'+input.replace(/"/g, '\\"').replace(/\n/g,'\\n').replace(/\r/g, '\\r')+'"}');
            }
        }
        
        function shipSay(from_client_id, from_client_name, ship,shipCount,isOpen){
                var html='<div class="s_sh" id="s_sh_'+from_client_id+'"><div class="nbox" id="nbox"><span class="n sign"></span><span id="shipCount" class="n n'+shipCount+'"></span></div> </div>'
                 $("#s_sh_"+from_client_id).css({ position:"absolute",top:rd(100,500),left:"13px",width:chatWidth,height:"40px"});
                  document.getElementById("dialog").innerHTML += html;
        }
    
        function changeShip(from_id,url){ 
	$.getJSON(url,{'renwu':from_id},function(json)
	{
        });
              open_[1]=0
        }  
        
        function suo(id,url){        
               timer[id]= window.setTimeout(function(){changeShip(id,url);},2000); 
                   
                  // alert( open_[1])
              
        }        
                                
        function stopSuo(id) {  
        
                window.clearInterval(timer[id]);         
        }   
        
        function goneShip(url) {
            $.getJSON(url,{'renwu':1},function(json){
                for(var item in json) {
                       // alert(json[item].renwu);
                    $("#s_sh_"+json[item].renwu).remove()
                       // stopSuo(json[item].renwu);
                }
            });
        }

function clearB()
{
// $("#dialog>div").slice(18).css('display','none');

 $("#dialog>div").slice(3).remove();
  
} 

function clearE()
{
$("#dialog").empty()

  
} 

  $('#content').infinitescroll({
		navSelector  	: "#navigation",
		nextSelector 	: "#navigation a:last",
		itemSelector 	: "#hproduct",
		debug		 	: true,
		dataType	 	: 'html',
                maxPage         : 30,
                bufferPx: 20,
                extraScrollPx: 200,
                loading: {           

                finishedMsg: "<em>没有了</em>",
                msgText: "<em >加载更多动态..</em>",
                    }
    }, function(newElements, data, url){
    	// $(newElements).css('background-color','#ffef00');
    	// $(this).prepend(newElements);
        <php>
for ($i = 1; $i < 60; $i++) {
</php>
var _renderItem = function(data) {
		return "<p><span class='author'>" + data.author + "</span>："+ data.message + "</p>"
	}
        
	
      $('#<php>echo "content".$i;</php>').infinitescroll({
		navSelector  	: "#<php>echo "navigation".$i;</php>",
		nextSelector 	: "#<php>echo "navigation".$i;</php> a:last",
		itemSelector 	: "#<php>echo "hproduct".$i;</php>",
		debug		 	: true,
		dataType	 	: 'json',
                appendCallback	: false,
                loading: {           

                finishedMsg: "<em>没有了</em>",
                msgText: "<em >加载更多评论..</em>",
                    }
    },function( response ) {
    	var jsonData = response;
        $theCntr = $("#<php>echo "content".$i;</php>");
        var newElements = "";
//var newItems = new Array();
        for(var i=0;i<jsonData.length;i++) {
        var item = $(_renderItem(jsonData[i]));
        //item.css({ opacity: 0 });
        $theCntr.append(item);
        //newItems.push(item.attr('id'));
        }
//_addMasonryItem(newItems);
});
    
jQuery(window).unbind('.infscr');

$("body").delegate("#<php>echo "navigation".$i;</php> a","click",function(){
//$('#<php>echo "navigation".$i;</php> a').live('click', function(){
//$("div").delegate("#<php>echo "content".$i;</php>","",infinitescroll('retrieve'){});  
$('#<php>echo "content".$i;</php>').infinitescroll('retrieve');
$('#<php>echo "navigation".$i;</php>').show();
return false;
});               
                    
<php>
}
</php>
        
        
        //
    });
    
jQuery(window).unbind('.infscr');

$('#navigation a').on('click', function(){


$('#content').infinitescroll('retrieve');
$('#navigation').show();
return false;
});


    </script>
<script src="__PUBLIC__/js/main.js"></script>
<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1262095256'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s19.cnzz.com/stat.php%3Fid%3D1262095256%26show%3Dpic' type='text/javascript'%3E%3C/script%3E"));</script>
	</body>
</html>
